import React, {Component} from 'react';

import { Route, Switch, Redirect } from 'react-router-dom'

// 公共样式
import './assets/styles/reset.css'
import './assets/styles/animate.css'

// tabbar /index
import  Index  from 'pages/index/Index.jsx'

// 首页子路由/hallChildRouter
import HomeChildRouter from 'pages/home/HomeChildRouter'

// 发现子路由/findChildRouter
import FindChildRouter from 'pages/find/FindChildRouter'

// 大厅子路由/hallChildRouter
import HallChildRouter from 'pages/hall/HallChildRouter'

// 我的子路由/findChildRouter
import MyChildRouter from 'pages/my/MyChildRouter'

//未发现界面
import Page404 from 'pages/page404/page404'

//text 
import Text from './text.jsx'


class App extends Component {
  render() { 
    return ( 
      <Switch>

        {/* tabbar */}
        <Route path="/index" component={Index}></Route>

        {/* 首页内部子路由 */}
        <Route path="/homeChildRouter" component={HomeChildRouter}></Route>

        {/* 发现内部子路由 */}
        <Route path="/findChildRouter" component={FindChildRouter}></Route>

        {/* 大厅内部子路由 */}
        <Route path="/hallChildRouter" component={HallChildRouter}></Route>
        
        {/* 我的内部子路由 */}
        <Route path="/myChildRouter" component={MyChildRouter}></Route>



<Route path='/text' component={Text}></Route>


        {/* 重定向 */}
        <Redirect from="/" to="/index" exact></Redirect>
        {/* 404 */}
        <Route component={Page404}></Route>

      </Switch>
    )
  }
}
 
export default App;
